package com.ruoyi.property.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.property.mapper.EquallySharedFormulaMapper;
import com.ruoyi.property.domain.EquallySharedFormula;
import com.ruoyi.property.service.IEquallySharedFormulaService;
import com.ruoyi.common.core.text.Convert;

/**
 * 公摊公式Service业务层处理
 * 
 * @author sux
 * @date 2021-06-29
 */
@Service
public class EquallySharedFormulaServiceImpl implements IEquallySharedFormulaService 
{
    @Autowired
    private EquallySharedFormulaMapper equallySharedFormulaMapper;

    /**
     * 查询公摊公式
     * 
     * @param formulaId 公摊公式ID
     * @return 公摊公式
     */
    @Override
    public EquallySharedFormula selectEquallySharedFormulaById(Integer formulaId)
    {
        return equallySharedFormulaMapper.selectEquallySharedFormulaById(formulaId);
    }

    /**
     * 查询公摊公式列表
     * 
     * @param equallySharedFormula 公摊公式
     * @return 公摊公式
     */
    @Override
    public List<EquallySharedFormula> selectEquallySharedFormulaList(EquallySharedFormula equallySharedFormula)
    {
        return equallySharedFormulaMapper.selectEquallySharedFormulaList(equallySharedFormula);
    }

    /**
     * 新增公摊公式
     * 
     * @param equallySharedFormula 公摊公式
     * @return 结果
     */
    @Override
    public int insertEquallySharedFormula(EquallySharedFormula equallySharedFormula)
    {
        return equallySharedFormulaMapper.insertEquallySharedFormula(equallySharedFormula);
    }

    /**
     * 修改公摊公式
     * 
     * @param equallySharedFormula 公摊公式
     * @return 结果
     */
    @Override
    public int updateEquallySharedFormula(EquallySharedFormula equallySharedFormula)
    {
        return equallySharedFormulaMapper.updateEquallySharedFormula(equallySharedFormula);
    }

    /**
     * 删除公摊公式对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEquallySharedFormulaByIds(String ids)
    {
        return equallySharedFormulaMapper.deleteEquallySharedFormulaByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除公摊公式信息
     * 
     * @param formulaId 公摊公式ID
     * @return 结果
     */
    @Override
    public int deleteEquallySharedFormulaById(Integer formulaId)
    {
        return equallySharedFormulaMapper.deleteEquallySharedFormulaById(formulaId);
    }
}
